<template>
  <div class="nav">
    <div @click="toWhere">
      <img src="http://file.rzkeji.com/web/recruit/icon/leftArrow.png" class="leftArrow"/>
    </div>
    <div class="title"><slot></slot></div>
  </div>
</template>

<script>
export default {
  props:{
    toLastPath:false
  },
	methods:{
    toWhere(path){
      document.querySelector("html").style.fontSize = "16px";
      if(this.toLastPath){
        this.$router.back()
      }else{
        this.$router.push({path:'/'})
      }
    }
	}
}
</script>

<style scoped>
.nav{width: 100%;height: 45px;background-image: linear-gradient(-135deg, #57D1E2 0%, #37AED6 100%);display: flex;justify-content: row;position: fixed;left: 0;top:0;z-index: 88}
.leftArrow{width: 20px;height: 20px;margin-top: 12.5px;margin-left: 10px;position: absolute;top:0;left:0}
.title{width: 305px;text-align: center;line-height: 45px;color: #fff;font-size: 18px;flex:1}
.menu{width: 30px;height: 30px;margin-top: 7.5px;}
</style>
